load("@rules_java//java:defs.bzl", "java_library")

package(
    default_applicable_licenses = [
        "//:license",
    ],
    default_visibility = [
        "//compiler:__pkg__",
        "//publish:__pkg__",
    ],
)

# keep sorted
COMPILER_SOURCES = [
    "CelCompilerFactory.java",
    "CelCompilerImpl.java",
]

# keep sorted
COMPILER_BUILDER_SOURCES = [
    "CelCompiler.java",
    "CelCompilerBuilder.java",
    "CelCompilerLibrary.java",
]

java_library(
    name = "compiler",
    srcs = COMPILER_SOURCES,
    tags = [
    ],
    deps = [
        ":compiler_builder",
        "//checker",
        "//checker:checker_builder",
        "//checker:checker_legacy_environment",
        "//checker:proto_type_mask",
        "//checker:standard_decl",
        "//common:cel_ast",
        "//common:cel_source",
        "//common:compiler_common",
        "//common:container",
        "//common:options",
        "//common/annotations",
        "//common/internal:env_visitor",
        "//common/types:cel_proto_types",
        "//common/types:type_providers",
        "//parser",
        "//parser:macro",
        "//parser:parser_builder",
        "@cel_spec//proto/cel/expr:checked_java_proto",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "compiler_builder",
    srcs = COMPILER_BUILDER_SOURCES,
    tags = [
    ],
    deps = [
        "//:auto_value",
        "//checker:checker_builder",
        "//checker:checker_legacy_environment",
        "//checker:proto_type_mask",
        "//checker:standard_decl",
        "//common:compiler_common",
        "//common:container",
        "//common:options",
        "//common/types:type_providers",
        "//parser:macro",
        "//parser:parser_builder",
        "@cel_spec//proto/cel/expr:checked_java_proto",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)
